

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>添加客户表单</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
</head>
<body>

  <form id="myform" class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
    <div style="font-size: 16px">基本信息</div>
    <div>
    <div class="layui-form-item">
      <!--企业名称-->
      <label class="layui-form-label required">企业名称</label>
      <div class="layui-input-inline">
        <input type="text" name="company_name" lay-verify="required" placeholder="请输入企业名称" autocomplete="off" class="layui-input">
      </div>
      <!--企业类型-->
      <label class="layui-form-label">企业类型</label>
      <div class="layui-input-inline">
        <select name="company_type">
          <option value="">--请选择--</option>
          <option value="企业">企业</option>
          <option value="政府">政府</option>
          <option value="个人">个人</option>
        </select>
      </div>
    </div>
      <!--           -->
    <div class="layui-form-item">
      <!--企业主页-->
      <label class="layui-form-label">企业主页</label>
      <div class="layui-input-inline">
        <input type="text" name="company_home" class="layui-input" id="company_home" placeholder="">
      </div>
      <!--状态-->
      <label class="layui-form-label">状态</label>
      <div class="layui-input-inline">
        <select name="state" lay-verify="required">
          <option value="1">启用</option>
          <option value="2">停用</option>
        </select>
      </div>
    </div>
    </div>

    <div>
    <div style="font-size: 16px">门户信息</div>
<!--           -->
    <div class="layui-form-item">
      <!--法人代表-->
      <label class="layui-form-label">法人代表</label>
      <div class="layui-input-inline">
        <input type="text" name="represent" lay-verify="required" autocomplete="off" class="layui-input">
      </div>
      <!--注册日期-->
      <label class="layui-form-label">注册日期</label>
      <div class="layui-input-inline">
        <input type="text" name="registration_time" class="layui-input" id="registration_time" placeholder="注册日期">
      </div>
    </div>
<!--           -->
      <div class="layui-form-item">
        <!--证件类型-->
        <label class="layui-form-label">证件类型</label>
      <div class="layui-input-inline">
        <select name="document_type" lay-verify="required">
          <option value="国内身份证">国内身份证</option>
          <option value="境外身份证">境外身份证</option>
          <option value="营业执照">营业执照</option>
          <option value="其他证件">其他证件</option>
        </select>
      </div>
        <!--证件号码-->
        <label class="layui-form-label">证件号码</label>
        <div class="layui-input-inline">
          <input type="text" name="document_num" lay-verify="required" autocomplete="off" class="layui-input">
        </div>
      </div>
<!--              -->

      <div class="layui-form-item">
        <!--国家-->
        <label class="layui-form-label">国家</label>
        <div class="layui-input-inline">
          <input type="text" name="country" value="中国" autocomplete="off" class="layui-input">
        </div>
        <!--地区-->
        <label class="layui-form-label">省/地区</label>
        <div class="layui-input-inline">
          <input type="text" name="provinces"  autocomplete="off" class="layui-input">
        </div>
      </div>

<!--       -->
      <div class="layui-form-item">
        <!--公司传真-->
        <label class="layui-form-label">公司传真</label>
        <div class="layui-input-inline">
          <input type="text" name="company_fax" class="layui-input"  placeholder="">
        </div>
        <!--城市-->
        <label class="layui-form-label">城市</label>
        <div class="layui-input-inline">
          <input type="text" name="city" class="layui-input"  placeholder="">
        </div>
      </div>
      <!--     -->
      <div class="layui-form-item">
        <!--公司传真-->
        <label class="layui-form-label">公司电话</label>
        <div class="layui-input-inline">
          <input type="text" name="company_tel" lay-verify="number" autocomplete="off" class="layui-input"  placeholder="">
        </div>
        <!--城市-->
        <label class="layui-form-label">区</label>
        <div class="layui-input-inline">
          <input type="text" name="area" class="layui-input"  placeholder="">
        </div>
      </div>
      <!--   -->
      <div class="layui-form-item">
        <!--公司地址-->
        <label class="layui-form-label">公司地址</label>
        <div class="layui-input-inline">
          <input type="text" name="company_address" autocomplete="off" class="layui-input"  placeholder="">
        </div>
      </div>
      <!--    -->
      <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
          <textarea placeholder="备注" name="note" style="width: 500px" class="layui-textarea"></textarea>
        </div>
      </div>

    </div>
<!--联系人-->
    <div>
      <div style="font-size: 16px">联系人</div>
      <table class="layui-table" >
        <thead>
        <tr>
          <th >姓名</th>
          <th >电话</th>
          <th >传真</th>
          <th >邮箱</th>
          <th >职务</th>
        </tr>
        <tr>
          <th> <input type="text" name="con_name" autocomplete="off" class="layui-input"  placeholder=""></th>
          <th> <input type="text" name="con_tel" lay-verify="number" autocomplete="off" lay-verify="number" class="layui-input"  placeholder=""></th>
          <th> <input type="text" name="con_fax" autocomplete="off" class="layui-input"  placeholder=""></th>
          <th> <input type="text" name="con_email" lay-verify="email" autocomplete="off" class="layui-input"  placeholder=""></th>
          <th> <input type="text" name="con_duties" autocomplete="off" class="layui-input"  placeholder=""></th>

        </tr>
        </thead>
      </table>
    </div>



    <!--确认提交-->
    <div class="layui-form-item ">
      <!--<input type="button" lay-submit="" lay-filter="LAY-user-front-submit" id="LAY-user-back-submit" value="确认">-->
      <span>&nbsp&nbsp</span>
      <button type="submit" id="submitcustomer" class="layui-btn" lay-submit="" lay-filter="addcustomer" id="LAY-user-back-submit">验证</button>
    </div>
  </form>








  <!--引入本地layui.js-->
  <script src="../../static/layui/layui.js"></script>
  <!--js-->
  <script type="text/javascript">
      layui.config({
          base: '../../static/layui/layuiadmin/' //静态资源所在路径js
      }).extend({
          index: 'lib/index' //主入口模块
      }).use('index');
  </script>
  <script>
      layui.use('laydate', function() {
          var laydate = layui.laydate;
          //常规用法
          laydate.render({
              elem: '#registration_time'
          });

      });
  </script>
  <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
  <script>
      layui.use(['form', 'layedit', 'laydate'], function(){
          var form = layui.form
              ,layer = layui.layer
              ,layedit = layui.layedit
              ,laydate = layui.laydate;

          //自定义验证规则
          form.verify({
              title: function(value){
                  if(value.length < 5){
                      return '标题至少得5个字符啊';
                  }
              }
              ,pass: [
                  /^[\S]{6,12}$/
                  ,'密码必须6到12位，且不能出现空格'
              ]
              ,content: function(value){
                  layedit.sync(editIndex);
              }
          });




      });
  </script>

</body>
</html>


</body>
</html>